#include "loader.h"

Loader::Loader():Process()
{
    name="Loader";
}
Loader::~Loader()
{

}
void Loader::Run()
{
    LogManager::getSingleton().Message("Loader", "step "+LogManager::getSingleton().toStr(currentStep));
    switch(currentStep){
    case 0:{

        ResourceAllocator::getSingleton().askForResource("MessageToLoader",id);
    }
    break;
    case 1:{
        //pildyt atminti
                //pildyt pulapiu lentele
    }
    break;
    case 2:{
        ResourceAllocator::getSingleton().addResource(new LoadedProgram(id,5));
    //vietoj 5 idet puslapiu lenteles adresa
    currentStep=-1;
    }
    break;
    default:
      qDebug() << "gg Loader";
    }
    currentStep++;
}
